
//////////////////////////////////////////////////////////////////////
#ifndef _BOUND_SLOT_H_
#define _BOUND_SLOT_H_

#include "config.h"
#include"functor/SubscriberSlot.h"

namespace KCore
{
	class Event;
	
	class _KExport BoundSlot
	{
	public:
		BoundSlot(int group, const SubscriberSlot& subscriber, Event& event);
		BoundSlot(const BoundSlot& other);
		~BoundSlot();

		bool connected() const;
		void disconnect();
		bool operator==(const BoundSlot& other) const;
		bool operator!=(const BoundSlot& other) const;

	private:
		friend class Event;
		// no assignment.
		BoundSlot& operator=(const BoundSlot& other);
		int _group;                  
		SubscriberSlot* _subscriber;   
		Event* _event;   
	};

};

#endif

